package com.windfone.service.impl;

import java.util.List;

import com.windfone.dao.RecommendDao;
import com.windfone.model.Recommend;
import com.windfone.model.RecommendType;
import com.windfone.service.RecommendService;

public class RecommendServiceImpl implements RecommendService {
	private RecommendDao recommendDao;
	public void setRecommendDao(RecommendDao recommendDao) {
		this.recommendDao = recommendDao;
	}

	public List<Recommend> getRecommendById(int keyValue) {
		return recommendDao.getRecommendById(keyValue);
	}

	public List<RecommendType> listAllRecommendType() {
		return recommendDao.listAllRecommendType();
	}

	public int updateRecommendById(Recommend bean) {
		return recommendDao.updateRecommendById(bean);
	}

	public int addRecommend(Recommend bean) {
		return recommendDao.addRecommend(bean);
	}

	public int deleRecommend(Recommend bean) {
		return recommendDao.deleRecommend(bean);
	}

	public List  getRecommendByRecommendTypeId(int recommendTypeId) {
		return recommendDao.getRecommendByRecommendTypeId( recommendTypeId );
	}
//	public List<Recommend> getRecommendByRecommendTypeId(int recommendTypeId) {
//		return recommendDao.getRecommendByRecommendTypeId( recommendTypeId );
//	}

	public List getRecordsByTableName(String tableName, String beginDate,String endDate, String beanName,String fields) {
		return recommendDao.getRecordsByTableName( tableName,  beginDate, endDate, beanName,fields);
	}

	public List<RecommendType> getRecommendTypeById(int recommendTypeId) {
		return recommendDao.getRecommendTypeById(recommendTypeId);
	}


}
